package com.cts.rt.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "ASSIGNMENT")
public class Assignment implements Serializable {

	private static final long serialVersionUID = 1165051281293899916L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID")
	private Long id;

	@ManyToOne
	@JoinColumn(name = "PROJECT_ID")
	private Project project;

	@ManyToOne
	@JoinColumn(name = "RESOURCE_TAGGED")
	private Employee resourceTagged;

	@ManyToOne
	@JoinColumn(name = "EMPLOYEE_ROLE")
	private EmployeeRole role;

	@Column(name = "ONSHORE_OFFSHORE", nullable = false)
	private String onshoreOffshore;

	@Column(name = "LOCATION", length = 16)
	private String location;

	@Column(name = "UTILIZATION")
	private Integer utilization;

	@Temporal(TemporalType.DATE)
	@Column(name = "START_DATE")
	private Date startDate;

	@Temporal(TemporalType.DATE)
	@Column(name = "END_DATE")
	private Date endDate;

	@Column(name = "NOTES")
	private String notes;

	@Column(name = "ACTIVE")
	private boolean active;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Project getProject() {
		return project;
	}

	public void setProject(Project project) {
		this.project = project;
	}

	public Employee getResourceTagged() {
		return resourceTagged;
	}

	public void setResourceTagged(Employee resourceTagged) {
		this.resourceTagged = resourceTagged;
	}

	public EmployeeRole getRole() {
		return role;
	}

	public void setRole(EmployeeRole role) {
		this.role = role;
	}

	public String getOnshoreOffshore() {
		return onshoreOffshore;
	}

	public void setOnshoreOffshore(String onshoreOffshore) {
		this.onshoreOffshore = onshoreOffshore;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public Integer getUtilization() {
		return utilization;
	}

	public void setUtilization(Integer utilization) {
		this.utilization = utilization;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

}
